<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>考卷评分</title>
<script type="text/javascript" src="<c:url value="js/jquery-easyui-1.5.4.2/jquery.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"/>"></script>
<link id="theme" rel="stylesheet" type="text/css"  href="<c:url value="js/jquery-easyui-1.5.4.2/themes/ui-cupertino/easyui.css"/>"/>
<link  rel="stylesheet" type="text/css" href="<c:url value="js/jquery-easyui-1.5.4.2/themes/icon.css"/>"/>
<body>
<script type="text/javascript">
	$(function(){
		$("#kjpf_clear").linkbutton({onClick:function(){
			//找到选中的行
			var row = $("#hhy_kjpf_findAll_datagrid").datagrid("getSelected");
			if(!row){
				$.messager.alert('提示', '没有选中要删除的行！');
				return;
			}
			
			$.messager.confirm('确认', '真的要删除吗？', function(v){
				$("<form method = 'post'>").appendTo(document.body).form({
					url:'kjpf_delete',
					onSubmit:function(params){
						params["grId"] =row.grId;
					},success:function(v){
						v = eval("(" + v + ")");
						if(v.success){
							
							$.messager.alert('恭喜', '删除成功');
							$('#hhy_kjpf_findAll_datagrid').datagrid('reload');
						}else{
							$.messager.alert('错误', '对不起，操作失败，原因：' + v.message);
						}
					}
				}).submit();

			});
		}});
		
	});	
</script>
	<table class="easyui-datagrid" id="hhy_kjpf_findAll_datagrid" style="text-align:center;width:100%;" data-options="
		method:'post',
		url:'tokjpf_findAll',
		fitColumns:true,
		fit:true,
		nowrap:false,
		autoRowHeight:true,
		rownumbers:true,
		singleSelect:true,
		pagination:true,
		pageList:[5,10,15,20],
		pageSize:5,
		striped:true,
		toolbar:'#kjpf'
	">
		<thead>
			<tr>
				<th data-options="field:'grId',align:'center',width:20">编号</th>
				<th data-options="field:'admId',align:'center',width:30">准考证号</th>
				<th data-options="field:'stainName',align:'center',width:20">考生姓名</th>
				<th data-options="field:'arrangeName',align:'center',width:20">考试安排</th>
				<th data-options="field:'classSjName',align:'center',width:20">试卷名称</th><!-- 
				<th data-options="field:'quName',align:'center',width:20">题库</th> -->
				<th data-options="field:'epStarttime',align:'center',width:50,
				formatter:function(value,row,index){
					var date= new Date(value);
					return date.toLocaleString();
				}">开始时间</th>
				<th data-options="field:'epEndtime',align:'center',width:50,
				formatter:function(value,row,index){
					var date= new Date(value);
					return date.toLocaleString();
				}">结束时间</th>
				<th data-options="field:'epShichang',align:'center',width:20">时长</th>
				<th data-options="field:'grState',align:'center',width:20">评分状态</th>
				<th data-options="field:'epDefen',align:'center',width:20">得分</th>
				<th data-options="field:'grPerson',align:'center',width:20">评分者</th>
				<th data-options="field:'grDate',align:'center',width:50,
				formatter:function(value,row,index){
					var date= new Date(value);
					return date.toLocaleString();
				}">评分日期</th>
			</tr>
		</thead>
		<tbody>
			
		</tbody>
	</table>
	<div id="kjpf">
		<a href="#" class="easyui-linkbutton" id="kjpf_clear" data-options="iconCls:'icon-clear',plain:true,text:'删除'"></a>
		考试日期  从  <input id="bir" class="easyui-datebox" data-options="width:100,height:25">
		到  <input id="bir" class="easyui-datebox" data-options="width:100,height:25">
		搜索文本  <input id="bir" class="easyui-textbox" data-options="width:100,height:25,placeholder:'编号，名称'">
		<a id="btn" class="easyui-linkbutton" data-options="width:60,height:25,plain:false,text:'搜索'"></a> 
	</div>
</body>
</html>